package com.zwd.cases.demo.gof23.decorator;

/**
 * @Description 定义具体装饰器类BlueFillDecorator，继承自ShapeDecorator，表示添加蓝色填充的装饰器
 * @Author zhengwd
 * @Date 2023/4/11 9:54
 **/
public class BlueFillDecorator extends ShapeDecorator {
    public BlueFillDecorator(Shape decoratedShape) {
        super(decoratedShape);
    }

    // 在原来作图的方法内增加需要的方法
    public void draw() {
        decoratedShape.draw();
        setBlueFill(decoratedShape);
    }

    private void setBlueFill(Shape decoratedShape) {
        System.out.println("Fill Color: Blue");
    }
}
